home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / kickstart tools / makekick / switchscript.doc < prev    next >
Text File  |  1996-04-07  |  4KB  |  114 lines

  1.  
  2.                           Startup Script Switcher 2.0
  3.  
  4.                  (c) 1993 Martin Mares, MJSoft System Software
  5.  
  6. ==============================================================================
  7.  
  8.  
  9. Introduction
  10. ------------
  11.  
  12.    Some months ago, I wrote a small utility called SwitchScript, which was
  13. able to execute scripts named S:Startup.xxxxx, where xxxxx was the version
  14. of currently running Kickstart. This utility was very useful, but had many
  15. disadvantages (when a registered developer upgraded his 39.110 to 39.115, he
  16. had to rename or copy his startup script ...). It's the reason why I have
  17. written another small utility named SwitchScript 2.0.
  18.  
  19.    SwitchScript and its documentation are Copyright (C) MJSoft System Software
  20. 1993, Prague, Czech Republic. They may be distributed only as a part of the
  21. MKick archive. They also may be included in the SKick archive.
  22.  
  23.  
  24. Usage
  25. -----
  26.  
  27.    SwitchScript is completely command-line controlled. But if you don't want
  28. to do anything with these mysteriously-named parameters, you can just say:
  29.  
  30.           SwitchScript
  31.  
  32.    In this case, SwitchScript will behave similarly to its older version.
  33. It will simply execute a script named S:Startup-vv, where vv is version number
  34. of Kickstart you are currently using.
  35.  
  36.    If you use SwitchScript 1.0 and you want to use your old scripts with
  37. new SwitchScript, you should use:
  38.  
  39.           SwitchScript *=S:Startup.%v%r
  40.  
  41.    But there are many other methods how to switch the scripts... They may be
  42. specified using the parameter line. This line consists of definition fields
  43. separated by spaces. Each field has the following form:
  44.  
  45.           <version>=<script name>
  46.  
  47.    Where  <version>  is Kickstart version pattern consisting of digits and/or an
  48. asterisk  sign  ("*"),  which  means  "any  number of any digits".  For example:
  49. 34005  is  equivalent  to  Kickstart  version  34.5 (the old 1.3), 39* means any
  50. Kickstart with version 39 (3.0) and * matches all Kickstart versions.
  51.  
  52.    <script name> is a name of script executed if we're using specified Kickstart.
  53. If this name doesn't contain a path (it means it doesn't have any ':' or '/'
  54. in it), 'S:Startup-' is inserted before it. Any '%v' is replaced by Kickstart
  55. version (two digits) and '%r' is replaced by Kickstart revision (three digits).
  56. (If we're using KS 34.5, %v%rx will expand to S:Startup-34005x, S:St-%v to
  57. S:St-34 etc.)
  58.  
  59.    If there is no matching version pattern, the standard script (S:Startup-%v%r)
  60. will be executed.
  61.  
  62.  
  63.     Example:  SwitchScript 34005=WB13:S/Startup-sequence 3911*=beta
  64.  
  65.       It will execute WB13:S/Startup-sequence in case we're using KS 1.3
  66.                       S:Startup-beta on condition we're using KS 39.110,39.115...
  67.                       S:Startup-37 if we're using 37.175
  68.                       S:Startup-39 if we're using 39.106
  69.                       S:Startup-40 if we're using 40.055
  70.                       ...
  71.  
  72.    If you use Kickstart 1.X, SwitchScript requires C:Run (standard command).
  73.  
  74.    Warning: Scripts started by SwitchScript must not contain any conditional
  75. processing, because SwitchScript uses slightly faster method of their execution,
  76. which doesn't support conditionals.
  77.  
  78.    Technical note: SwitchScript uses Execute("",Open(script,MODE_OLDFILE),
  79. Output()). If you have an idea how to do it better, let me know.
  80.  
  81.  
  82. Return codes
  83. ------------
  84.  
  85.    Because I'm very lazy and I tried to make this program small, SwitchScript
  86. displays NO error messages. All kinds of errors are signalized by different
  87. return codes:
  88.  
  89.     0 - everything is OK
  90.    20 - startup script failed / C:Run not present
  91.    21 - command-line syntax error
  92.    22 - script name too long (maximum is 63 characters)
  93.    23 - startup script not found
  94.  
  95.  
  96. Installation
  97. ------------
  98.  
  99.    First create the startup scripts for all the Kickstarts used. These scripts
  100. have to contain no final EndCLI statements.
  101.  
  102.    Copy SwitchScript to your C: directory and replace your
  103. Startup-sequence by following text:
  104.  
  105. MKick                               (or SKick if you have 2.0 or higher)
  106. SwitchScript
  107. EndCLI
  108.  
  109.  
  110. Final words
  111. -----------
  112.  
  113.    Send all suggestions, comments and bug reports to mjsoft@k332.feld.cvut.cz.
  114.